Socket
Socket
Sign inDemoInstall

secure-keys

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

secure-keys

Encrypt/Decrypt the values of a given object


Version published
Weekly downloads
573K
increased by4.69%
Maintainers
1
Weekly downloads
 
Created
Source

secure-keys

build
status

A simple module that encrypts/decrypts the keys of a given object

install

npm i secure-keys --save

usage


var SecK = require('secure-keys');

var sec = new SecK({
  secret: 'BEGIN RSA', // Text of key used for encrypting/decrypting
  format: JSON, // optional (defaults to JSON): An object with `stringify` and `parse` methods
  alg: 'aes-256-ctr' //optional (this is default) Algorithm to use for encrypt/decrypt
});

var encryptedObj = sec.encrypt({
  myConfig: 'values',
  needTo: 'be safe'
});

var decryptedObj = sec.decrypt(encryptedObj);

LICENSE

MIT


This code was yanked out of work by @indexzero for nconf

Keywords

FAQs

Package last updated on 02 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc